import request from '@/plugins/axios/request';
const baseURL = process.env.VUE_APP_BASE_API+'/indicatorInput';

//添加或修改成员
export function addMember(data) {
  return request({
    url: `${baseURL}/addMember`,
    method: "post",
    data,
    isShowMessage:true
  });
}

//删除18号文项目经费
export function delFundEighteen(data) {
  return request({
    url: `${baseURL}/delFundEighteen/${data.annualFundId}`,
    method: "get",
    isShowMessage:true
  });
}

//删除8号文经费
export function delProjectFund(data) {
  return request({
    url: `${baseURL}/delProjectFund/${data.annualFundId}`,
    method: "get",
    isShowMessage:true
  });
}


// 移除成员
export function delMember(data) {
  return request({
    url: `${baseURL}/delMember/${data.memberId}`,
    method: "post",
    isShowMessage:true
  });
}

// 下载成员导入模板
export function downLoadMemberTemplate() {
  return request({
    url: `${baseURL}/downLoadMemberTemplate`,
    method: "get",
    isShowMessage: true,
    isDownLoadFile:true
  });
}

// 抽取信息
export function extractInfo(data) {
  return request({
    url: `${baseURL}/extractInfo`,
    method: "post",
    data,
    // isShowMessage: true,
  });
}

// 获取指标录入信息
export function getIndicatorInputInfo(data) {
  return request({
    url: `${baseURL}/getIndicatorInputInfo/${data.projectId}/${data.projectStage}`,
    // data,
    method: "get",
  });
}

// 成员导入
export function importMember(data) {
  return request({
    url: `${baseURL}/importMember/${data.projectId}/${data.projectStage}`,
    method: "post",
    data:data.file,
    isShowMessage: true,
  });
}

// 添加或修改18号文项目经费
export function saveOrUpdateFundEighteen(data) {
  return request({
    url: `${baseURL}/saveOrUpdateFundEighteen`,
    method: "post",
    data,
    isShowMessage: true,
  });
}

// 添加或修改指标信息-成果信息-进度信息
export function saveOrUpdateInfo(data) {
  return request({
    url: `${baseURL}/saveOrUpdateInfo`,
    method: "post",
    data,
    isShowMessage: true,
  });
}

// 添加或修改8号文项目经费
export function saveOrUpdateProjectFundEight(data) {
  return request({
    url: `${baseURL}/saveOrUpdateProjectFundEight`,
    method: "post",
    data,
    isShowMessage: true,
  });
}

// 导出
export function exportContrastInfo(data) {
  return request({
    url: `${baseURL}/exportContrastInfo/${data.projectId}`,
    method: "get",
    isShowMessage: true,
    isDownLoadFile:true
  });
}

